﻿<%@ Page Language="C#" MasterPageFile="~/Design/MasterPage/MasterPage.master" ValidateRequest="false"
    AutoEventWireup="true" CodeFile="SaleProcessBeginForm.aspx.cs" Inherits="App_Input_SaleProcessBeginForm"
    Title="新建销售档案" %>

<%@ Register Assembly="ShpmCommon" Namespace="Shpm.System.Web.Control" TagPrefix="cc1" %>
<%@ Import Namespace="Shpm.App.Commons.Db.Beans.Inp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
  
    <script language="javascript" type="text/javascript">
        function openRoomSearch(controlId){
            var url  = "../Commons/RoomSearchForm.aspx";
	        var prm  = "?tID=" + controlId;
	        url += prm;
	        var win = window.open(url,'RoomSearchForm','scrollbars,resizable');
	        win.focus();
        }
        
        function settext(id,val){    
            window.document.getElementById(id).value = val;
        }
        
        // confirm ok
        function confirmSubmit(){
            var ctrVisit = null;
            ctrVisit = '<%=txtMemo.ClientID%>';
            //if (window.document.getElementById(ctrVisit).value.replace(/\s/g,"").length  == 0){
            //    return window.confirm('回访信息内容为空，是否继续进行登记？');                
            //}
            return true;
        }
        
        // 
//        function disp(show){
//        //alert(document.getElementById("subMenu02").style.display);return;            
//            if (1 == show){            
//                document.getElementById("subMenu02").style.display = "block";
//            } else {
//                if (event.x > 30 && event.x < 550
//                    && event.y > 55 && event.y < 90){
//                    document.getElementById("subMenu02").style.display = "block";
//                } else {
//                    document.getElementById("subMenu02").style.display = "none";
//                }
//            }
//        }
    </script>

    <cc1:ComValidator ID="ComValidator1" runat="server" CheckItems-Capacity="4" ForeColor="White">
        <cc1:CheckRequiredAttribute Code="E0082" ControlToValidator="txtName">
            <cc1:ComAbsParamsAttribute Parameter="姓名" />
        </cc1:CheckRequiredAttribute>
        <cc1:CheckLongAttribute Code="E0322" ControlToValidator="txtAge">
            <cc1:ComAbsParamsAttribute Parameter="年龄" />
        </cc1:CheckLongAttribute>
        <cc1:CheckLongMoreAttribute Code="E0065" ControlToValidator="txtAge" More="18">
            <cc1:ComAbsParamsAttribute Parameter="年龄" />
            <cc1:ComAbsParamsAttribute Parameter="18" />
            <cc1:ComAbsParamsAttribute Parameter="150" />
        </cc1:CheckLongMoreAttribute>
        <cc1:CheckLongLessAttribute Code="E0065" ControlToValidator="txtAge" Less="150">
            <cc1:ComAbsParamsAttribute Parameter="年龄" />
            <cc1:ComAbsParamsAttribute Parameter="18" />
            <cc1:ComAbsParamsAttribute Parameter="150" />
        </cc1:CheckLongLessAttribute>
    </cc1:ComValidator>
    <cc1:ComValidator ID="ComValidator2" runat="server" ForeColor="White">
    </cc1:ComValidator>
    <div id="container">
        <div id="title">
            <ul>
                <li id="tag1">
                    <asp:LinkButton ID="LinkButton1" OnCommand="lnkTab_Command" CommandName="btn0" runat="server"
                        CssClass="selectli" OnClientClick="return false;" Width="105px"><span class="selectspan">新建销售档案</span></asp:LinkButton>
                </li>
                <li id="tag2">
                    <asp:LinkButton ID="LinkButton2" OnCommand="lnkTab_Command" CommandName="btn1" runat="server"><span>销售记录</span></asp:LinkButton>
                </li>
                <li id="tag4">
                    <asp:LinkButton ID="LinkButton4" OnCommand="lnkTab_Command" CommandName="btn3" runat="server" Width="95px"><span>权益人管理</span></asp:LinkButton>
                </li>
                <li id="tag3">
                    <asp:LinkButton ID="LinkButton3" OnCommand="lnkTab_Command" CommandName="btn2" runat="server"><span>会员管理</span></asp:LinkButton>
                </li>
                <li id="Li8">
                    <asp:LinkButton ID="LinkButton13" OnCommand="lnkTab_Command" CommandName="btn6" runat="server" Width="105px"><span>入住资格审核</span></asp:LinkButton>
                </li>
                <li id="tag5">
                    <asp:LinkButton ID="LinkButton5" OnCommand="lnkTab_Command" CommandName="btn4" runat="server"><span>会员入住</span></asp:LinkButton>
                </li>
            </ul>
            <ul id="subMenu02" style="display: none">
                <li id="Li1">
                    <asp:LinkButton ID="LinkButton6" OnCommand="lnkTab_Command" CommandName="btn2_1"
                        runat="server"><span>会员信息</span></asp:LinkButton></li><li id="Li2">
                            <asp:LinkButton ID="LinkButton7" OnCommand="lnkTab_Command" CommandName="btn2_2"
                                runat="server"><span>副会员</span></asp:LinkButton></li><li id="Li3">
                                    <asp:LinkButton ID="LinkButton8" OnCommand="lnkTab_Command" CommandName="btn2_3"
                                        runat="server"><span>陪住人</span></asp:LinkButton>
                                </li>
                <li id="Li4">
                    <asp:LinkButton ID="LinkButton9" OnCommand="lnkTab_Command" CommandName="btn2_4"
                        runat="server"><span>体检报告</span></asp:LinkButton>
                </li>
                <li id="Li5">
                    <asp:LinkButton ID="LinkButton10" OnCommand="lnkTab_Command" CommandName="btn2_5"
                        runat="server"><span>审核</span></asp:LinkButton>
                </li>
                <li id="Li6">
                    <asp:LinkButton ID="LinkButton11" OnCommand="lnkTab_Command" CommandName="btn2_6"
                        runat="server"><span>会员合同</span></asp:LinkButton>
                </li>
                <li id="Li7">
                    <asp:LinkButton ID="LinkButton12" OnCommand="lnkTab_Command" CommandName="btn2_7"
                        runat="server"><span>补充信息</span></asp:LinkButton>
                </li>
            </ul>
        </div>
        <div id="content" class="content1">
            <table width="100%">
                <tr>
                    <td class="">
                        <table class="table_border_line">
                            <tr>
                                <th align="left" colspan="6">

                                    <script language="javascript">
                                        (new TitleBar('RegisterBar', '客户基本信息录入')).showBar();
                                    </script>

                                </th>
                            </tr>
                            <tr style="display: none">
                                <td style="width: 10px; background-color: #ffffff" height="25"></td>
                                <td align="left" nowrap style="width: 16%; background-color: #ffffff" height="25">销售编号：</td>
                                <td align="left" style="width: 80%; background-color: #ffffff">&nbsp;<asp:Label ID="lblProcId"
                                    runat="server"></asp:Label></td>
                                <td align="right" colspan="3" style="background-color: #ffffff">
                                    <br />
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 10px; background-color: #ffffff" height="25">
                                    <br />
                                </td>
                                <td align="left" class="" nowrap="nowrap" style="width: 16%; background-color: #ffffff"
                                    height="25">员工姓名：</td>
                                <td align="left" style="width: 80%; background-color: #ffffff">&nbsp;<asp:Label ID="lblEmpId"
                                    runat="server"></asp:Label></td>
                                <td align="right" colspan="3" style="background-color: #ffffff">
                                    <br />
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 10px; background-color: #ffffff" height="25">&nbsp;</td>
                                <td style="background-color: #ffffff" class="" nowrap height="25">客户姓名：<span style="color: #ff7300">(*)</span></td>
                                <td style="background-color: #ffffff" align="left">&nbsp;<asp:TextBox ID="txtName"
                                    runat="server" MaxLength="20"></asp:TextBox>&nbsp;
                                    <asp:Button ID="modify" runat="server" OnClick="modify_Click" Text=" 编 辑 " Visible="false" /></td>
                                <td colspan="3" align="right" style="background-color: #ffffff">&nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 10px; background-color: #ffffff" height="25">&nbsp;</td>
                                <td class="" nowrap height="25" style="background-color: #ffffff">客户性别：</td>
                                <td style="background-color: #ffffff">&nbsp;<asp:RadioButtonList ID="lstGender" runat="server"
                                    RepeatDirection="Horizontal" RepeatLayout="Flow">
                                </asp:RadioButtonList></td>
                                <td colspan="3" align="right" style="background-color: #ffffff">&nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 10px; background-color: #ffffff" height="25"></td>
                                <td class="" nowrap="nowrap" height="25" style="background-color: #ffffff">客户年龄：</td>
                                <td style="background-color: #ffffff">&nbsp;<asp:TextBox ID="txtAge" runat="server"
                                    MaxLength="3" Style="text-align: left"></asp:TextBox></td>
                                <td align="right" colspan="3" style="background-color: #ffffff">
                                    <br />
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 10px; height: 26px; background-color: #ffffff"></td>
                                <td class="" nowrap="nowrap" style="height: 26px; background-color: #ffffff">联系电话：</td>
                                <td style="height: 26px; background-color: #ffffff">&nbsp;<asp:TextBox ID="txtTel"
                                    runat="server" MaxLength="32"></asp:TextBox></td>
                                <td align="right" colspan="3" style="height: 26px; background-color: #ffffff">
                                    <br />
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 10px; background-color: #ffffff" height="25">
                                    <br />
                                </td>
                                <td class="" nowrap="nowrap" height="25" style="background-color: #ffffff">传真号码：</td>
                                <td style="background-color: #ffffff">&nbsp;<asp:TextBox ID="txtFax" runat="server"
                                    MaxLength="32"></asp:TextBox></td>
                                <td align="right" colspan="3" style="background-color: #ffffff">
                                    <br />
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 10px; background-color: #ffffff" height="25"></td>
                                <td class="" nowrap="nowrap" height="25" style="background-color: #ffffff">邮件地址：</td>
                                <td style="background-color: #ffffff">&nbsp;<asp:TextBox ID="txtMail" runat="server"
                                    MaxLength="100"></asp:TextBox></td>
                                <td align="right" colspan="3" style="background-color: #ffffff">
                                    <br />
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 10px; background-color: #ffffff" height="25"></td>
                                <td class="" nowrap="nowrap" height="25" style="background-color: #ffffff">联系地址：</td>
                                <td style="background-color: #ffffff">&nbsp;<asp:TextBox ID="txtAddress" runat="server"
                                    MaxLength="100" Width="370px"></asp:TextBox></td>
                                <td align="right" colspan="3" style="background-color: #ffffff">
                                    <br />
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 10px; background-color: #ffffff; height: 32px;"></td>
                                <td class="" nowrap="nowrap" style="height: 32px; background-color: #ffffff">客户来源：</td>
                                <td style="background-color: #ffffff; height: 32px;">&nbsp;<asp:DropDownList ID="lstCusFrom"
                                    runat="server">
                                </asp:DropDownList></td>
                                <td align="right" colspan="3" style="background-color: #ffffff; height: 32px;">
                                    <br />
                                </td>
                            </tr>
                            <tr style="display:none;">
                                <td style="width: 10px; background-color: #ffffff; height: 25px;">&nbsp;</td>
                                <td class="" nowrap style="background-color: #ffffff; height: 25px;">意向程度：</td>
                                <td style="background-color: #ffffff; height: 25px;">&nbsp;<asp:RadioButtonList ID="lstIntent" runat="server"
                                    RepeatDirection="Horizontal" RepeatLayout="Flow" ForeColor="Goldenrod">
                                </asp:RadioButtonList></td>
                                <td colspan="3" align="right" style="background-color: #ffffff; height: 25px;">&nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 10px; background-color: #ffffff" height="25">&nbsp;</td>
                                <td class="" nowrap height="25" style="background-color: #ffffff">购买卡类：</td>
                                <td style="background-color: #ffffff">&nbsp;<asp:RadioButtonList ID="lstCardType"
                                    runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                                </asp:RadioButtonList></td>
                                <td colspan="3" align="right" style="background-color: #ffffff">&nbsp;</td>
                            </tr>
                            <tr>
                                <td height="25" style="width: 10px; background-color: #ffffff"></td>
                                <td class="" height="25" nowrap="nowrap" style="background-color: #ffffff">意向房间：</td>
                                <td style="background-color: #ffffff">&nbsp;<asp:TextBox ID="txtRoomNo" runat="server"
                                    MaxLength="6" Width="155px"></asp:TextBox>&nbsp;
                                    <input id="btnRoomSrh" type="button" value="房间检索" onclick="javascript:openRoomSearch('<%=txtRoomNo.ClientID%>');" /></td>
                                <td align="right" colspan="3" style="background-color: #ffffff"></td>
                            </tr>
                            <tr>
                                <td height="25" style="width: 10px; background-color: #ffffff"></td>
                                <td class="" height="25" nowrap="nowrap" style="background-color: #ffffff">意向日期：</td>
                                <td style="background-color: #ffffff">&nbsp;<asp:TextBox ID="txtIntentDate" runat="server"
                                    MaxLength="10" Width="155px" onfocus="new Calendar(1900,2015,0,null).show(this);" ></asp:TextBox></td>
                                <td align="right" colspan="3" style="background-color: #ffffff"></td>
                            </tr>
                            <tr>
                                <td style="width: 10px; background-color: #ffffff"></td>
                                <td class="" nowrap style="background-color: #ffffff">备注：</td>
                                <td style="background-color: #ffffff">&nbsp;<asp:TextBox ID="txtMemo" runat="server"
                                    MaxLength="255" Rows="5" TextMode="MultiLine" Width="370px"></asp:TextBox></td>
                                <td align="right" colspan="3" style="background-color: #ffffff">
                                    <br />
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 10px"></td>
                                <td colspan="2" align="center"></td>
                                <td colspan="3" align="right">&nbsp;</td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div>
                            <table id="tableResult" runat="server" width="100%">
                                <tr>
                                    <td align="left">

                                        <script language="javascript">
                                        (new TitleBar('RegisterBar1', '回访履历列表')).showBar();
                                        </script>

                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:GridView ID="viewSrhRst" runat="server" AutoGenerateColumns="False" CssClass="GridView_table"
                                            DataKeyNames="SaleVisitingId" OnRowDataBound="viewSrhRst_RowDataBound" OnRowCommand="viewSrhRst_RowCommand">
                                            <Columns>
                                                <asp:BoundField HeaderText="详细编号" DataField="SaleVisitingId" Visible="false">
                                                    <HeaderStyle Width="0px" CssClass="GridView_head_grayblue" />
                                                    <ItemStyle CssClass="GridView_item_left" />
                                                </asp:BoundField>
                                                <asp:BoundField HeaderText="登记日期" DataField="NewDate" DataFormatString="{0:yyyy/MM/dd}">
                                                    <HeaderStyle Width="15%" CssClass="GridView_head_grayblue" />
                                                    <ItemStyle CssClass="GridView_item_center" />
                                                </asp:BoundField>
                                                <asp:BoundField HeaderText="回访信息" DataField="Memo">
                                                    <ItemStyle CssClass="GridView_item_left" />
                                                    <HeaderStyle Width="70%" CssClass="GridView_head_grayblue" />
                                                </asp:BoundField>
                                                <asp:TemplateField HeaderText="删除" ShowHeader="False" Visible="false">
                                                    <ItemStyle CssClass="GridView_item_center" />
                                                    <HeaderStyle CssClass="GridView_head_grayblue" />
                                                    <ItemTemplate>
                                                        <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="false" ImageUrl="~/images/delete.jpg"
                                                            CommandArgument="<%# ((InpSalesVistingBean)Container.DataItem).SaleVisitingId %>"
                                                            OnClientClick="javascript:return window.confirm('确定要删除当前履历吗？');" ToolTip="删除" />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                        </asp:GridView>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td align="center" style="">
                        <asp:Button ID="btnOk" runat="server" Text="保存" CssClass="button" OnClientClick="javascript:return confirmSubmit();"
                            OnClick="btnOk_Click" Width="75px" />&nbsp;&nbsp; &nbsp;
                        <asp:Button ID="btnClr" runat="server" Text="重填" CssClass="button" OnClick="btnClr_Click" Width="75px" /></td>
                </tr>
            </table>
        </div>
    </div>
    <!--**************************************************-->
    <!--销售过程跟踪-->
    <%-- 
    <table class="table_border_line">
        <tr>
            <th align="left" colspan="8" style="text-align: left;">

                <script language="javascript">
                                        (new TitleBar('RegisterBar2', '销售过程跟踪:')).showBar();
                </script>

            </th>
        </tr>
        <tr>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td style="background: ffffff" class="">
                <asp:LinkButton ID="lnkBtn0" runat="server" ForeColor="Red" OnClientClick="javascript:return false;">&nbsp;&nbsp;新建登记－〉</asp:LinkButton></td>
            <td style="background: ffffff" class="">
                <asp:LinkButton ID="lnkBtn1" runat="server" Enabled="False" OnCommand="lnkBtn_Command"
                    CommandName="btn1">&nbsp;销售记录－〉</asp:LinkButton></td>
            <td style="display: none" class="">
                <asp:LinkButton ID="lnkBtn2" runat="server" Enabled="False" OnCommand="lnkBtn_Command"
                    CommandName="btn2">&nbsp;体检－〉</asp:LinkButton></td>
            <td style="background: ffffff" class="">
                <asp:LinkButton ID="lnkBtn3" runat="server" Enabled="False" OnCommand="lnkBtn_Command"
                    CommandName="btn3">&nbsp;提交审核－〉</asp:LinkButton></td>
            <td style="background: ffffff" class="">
                <asp:LinkButton ID="lnkBtn4" runat="server" Enabled="False" OnCommand="lnkBtn_Command"
                    CommandName="btn4">&nbsp;签订合同－〉</asp:LinkButton></td>
            <td style="background: ffffff" class="">
                <asp:LinkButton ID="lnkBtn5" runat="server" Enabled="False" OnCommand="lnkBtn_Command"
                    CommandName="btn5">&nbsp;财务收费－〉</asp:LinkButton></td>
            <td style="background: ffffff" class="">
                <asp:LinkButton ID="lnkBtn6" runat="server" Enabled="False" OnCommand="lnkBtn_Command"
                    CommandName="btn6">&nbsp;移交资料</asp:LinkButton></td>
            <td style="display: none" class="">
                <asp:LinkButton ID="lnkBtn7" runat="server" Enabled="False" OnCommand="lnkBtn_Command"
                    CommandName="btn7">&nbsp;完成</asp:LinkButton>
            </td>
        </tr>
        <tr>
            <td style=""></td>
            <td style=""></td>
            <td style=""></td>
            <td style=""></td>
            <td style=""></td>
            <td style=""></td>
            <td style=""></td>
            <td style=""></td>
        </tr>
    </table>
    --%>
</asp:Content>
